package com.ffyc.cemp.domain.vo;

import com.ffyc.cemp.domain.entity.Cinema;
import com.ffyc.cemp.domain.entity.Hall;
import com.ffyc.cemp.domain.entity.Movie;
import com.ffyc.cemp.domain.entity.Schedule;
import lombok.*;

import java.text.SimpleDateFormat;

//@Data
//@NoArgsConstructor
//@AllArgsConstructor
public class ScheduleVo {
    private Movie movie;
    private Schedule schedule;
    @Setter
    @Getter
    private Hall hall;
    @Setter@Getter
    private Cinema cinema;

    public ScheduleVo(Movie movie, Schedule schedule) {
        this.movie = movie;
        this.schedule = schedule;
    }


    public int getScheduleId(){
        return schedule.getId();
    }

    public int getMovieId() {
        return movie.getId();
    }

    public String getMovieName() {
        return movie.getName();
    }

    public String getMovieStars() {
        return movie.getStars();
    }

    public String getStartTime() {
        return schedule.getStartTime();
    }

    public String getEndTime() {
        return schedule.getEndTime();
    }

    public String getDate() {
        return new SimpleDateFormat("yyyy-MM-dd").format(schedule.getDate());
    }


    public Double getPrice(){
        return schedule.getPrice();
    }
}
